Schema fixes
Tidies up the views
Fix for OAuth
Deleted some redundant test code