Refactor/resource manager preview view

Split up the preview code into view controllers and separate xib for each type of previewing.
Tests.