refactoring and initial (nonworking) fibonacci heap version