lots of refactoring & cleanups; charts; polish routes