cleaned up some of the application preprocessing