Clean up CLI command parser for the PROGRAM command, move file section fetch to an internal function.