Bug with NumOfViews fixed.

First, fully working version.