Huge code merge. This reflects the current status of my rewrite/restructuring. A...