Refactor

Hey Darius! I finally got a chance to check out the source, and I had some ideas for improving it. Let me know what you think