some cleanup and organization