code cleanup and formatting
Modifications before merge to master