improved workflow structure, passing system into main web handler.