Refactor completely, make packages, prepare for public documentation overhaul.