Improved Element.java as per @1603