refactoring code
refactoring code
correcting some small bugs in the views