Last major modifications complete. Remaining tasks: commenting/cleaning code