Moving template haskell code to utils. Added generated span annotation for source controllers.