Cleaned up/fixed view function
Merge branch 'xml-importer' into dev