updated tests, views and functional tests