Remove unused variables
Pass in boolean to view