Finished ProgramHandler, including tests