Added x-controller handling to view controller