Refactored to add a ViewManager