cleaned up code and stuff