clean up the code a bunch