Added readme and cleaned up code