element prototype and other improvements