implement CustomElement

Create CustomElement class for non-UI widgets, fixes #81