Fix whitespace and define constants at top