Controller changed to be used as object not class