views rewritten to use classes