Deleted unnecessary parts of controller