Removing unnecessary code, change CGFloat to float for smaller memory allocation. Need to refactor.