Refactored the fibonacci solution