FIXED: Various fixes, ending the large-scale rewrite!