Refactoring of return value used by sub project view, added unit test, reverted unrelated format changes

Pull request of two commits. 
-  Added return value object and added unit test
-  Revert unrelated format changes