cleaned up some source code