changes from GitHubmaster
added relations and indexes to viewer.rb
Merge branch 'featureModel'