Greedier w/ partitioning, cleaning and more comments.