Cleaned up code and wrote README. Documented everything