cleaned up code and added readme