Version 1.1: Cleaned code and fixed a bunch of glaring errors.