Hearts held the advantage at half-time during a hectic opening 45 minutes against Dundee United.
Within the first minute Hearts tested Alan Combe when Colin Cameron drove a 20-yard shot which the Dundee United keeper held well.
Hearts did not have to wait long for the opening goal after they had caught United's rejigged defence cold.
Andy Kirk did well to find Cameron and the unmarked Scotland midfielder surged forward before shooting easily past Combe from 10 yards.
Hearts' Scott Severin tried a 25-yard shot which just flew over before Gary McSwegan hit the post on 12 minutes after just six yards.
Robert Tomaschek rifled a 20-yard shot just past as Hearts continued the tactic of firing as many shots as possible on the United goal.
United came close though when Charlie Miller sent a glancing header narrowly past from Neil Heaney's 16th minute cross.
Steve Fulton then played a dangerous cross into the United box and Heaney threw himself at the ball to divert a spectacular diving header past his own keeper and put Hearts in a commanding position after only 19 minutes.
At this stage the Tangerines were looking rattled as Hearts forced two corners in quick succession and from the second, sent in by Fulton, Steven Pressley contested for the ball with Combe and then Kirk shot just over.
At this stage United were in desperate need of some encouragement and on 26 minutes Aljofree sent a 25-yarder into Niemi's bottom left corner.
United were clearly fired up by that goal as the game suddenly became a lot more interesting.
Hearts still look the more dangerous side though and on a couple of occasions Combe's goal led a charmed life.
United took off Neil Heaney after 34 minutes with Craig Easton coming on as boss Alex Smith tried some tactical alterations to change the pattern of the game.
Last weekend United survived a siege on their goal at home to Rangers courtesy of a tenacious performance and now one wondered if they could conjure up another get-out-of-jail act at Tynecastle.
On the stroke of half-time Combe's made a good diving save to hold a powerful Cameron net-bound header after Fulton's neat cross.