Cleanup code and formatting
Code format improvements