cleanup

moved cleanup function to load before any other functions