Reorganized things to enable the first API clients