Cleanup and refactoring everything to double.