added new functionality, updated README, started cleaning up code