Update README and some code cleanup