views code reformatted to make more readable
merge conflicts resolved