Preliminary elementx module

This is the preliminary elementx module.  The definition part is
complete, but the actions are still pseudocode.