Removed unwanted code from controller