Move ObjectDialog to a separate file