Adding readme and some code cleanup