Cleaned up code significantly, added Partition.hpp.