Cleaned this thing up a little.
Added a working and fast solution to problem 51.
Merge.