Added element class utility functions and getWidth/getHeight