Modularization Improvements

I saw your thread on reddit yesterday and I started playing with your code since it looks like a really cool project. I made some changes in my fork, take a look and include them if you think they're valuable to the project.

Thanks!