Extract command service

All files should have `"use strict";` at the top.