First working version of the complete service layer rewrite. Patches for dispatch and bootstrap to match.