Controller Generator Code