cleaned up some code + changed dependancies