fixed some issues and cleaned the view