Cleanup

fixed dependencies, cleaned up code a little