Clean up code and test this out alittle