Separate ui from api

Revises multiple components to support a separated and distributed deployment.
Includes initial scripts for automating the separation.