Moved Perspex <-> D2D conversions to ext. methods.