Cleaning up code and int to double

Removed unused methods and unused imports, clarified comments and
changed Integers to Doubles where applicable (for a greater range)