Fixed errors in unit tests and functions in view.py