Refactored and Fixed views