update for messages and more dynamic way to pass template filename to controller