Adding views loading functionality