Improve views and function