Refactor create, update methods for programs.