Refactor and cleanup Nub and static /api/ structure.