Some unfinished changes to controller