cleaned up formatting and variable declarations