fixed back button issue where first directory would show extra results after returning, moved view types to separate files