Creates controller functionality