cleaned up spacing; clarified parentheses style; tweaked naming convention for functions