refactored: not using the RootPanel class but Elements instead