cleaned up the application ordering