Code cleanup and new readme.md