fix + refactor main view