Improved element and node creation