Updated view to remove redundant code