Minor bug fixes and added readme and comments