Adding readme and cleaning up code