Finished overhaul; will merge with master