Added solution to problem 33.
Slightly faster implementation.
Code cleanup.