New startup sequence, employ docstore hooks, move types out of docstore