cleaned up code, added some dependencies