Cleanup and formatting