Style cleanup and tests