Huge refactoring of codebase, simplification of interface.