Made code more organized. Updated README.md