cleaning up code, testing more stuff out