cleaning up view script