fixing stuff and cleaning up