Commented and format doubles

Commented code and formatted all doubles to 6 decimal places