CmdStackApp: refactoru connecting gui to/from controller into reusable functions #36