Added comments and refactored a floatMap() function out