Change float references to CGFloat
Fix compile warnings by using number literals