Extract command pattern version of light in a separate file.