Adds powermate control script (mostly derived from other places)