Removing dependencies of views from models
Other minor refactory