Refactored some views and some controllers