So I wrote an extend function which takes an html element as parameter and dynamically adds behaviour.
Since we want to these extensions for free by default, we write our own get method for retrieving elements
You can now clear the container in 1 statement:
var myContainer = DOM.get("some-id");
Adding an event handler or event listener using our own method allows us to add behaviour later on easily. An example is shown below:
It also becomes very easy to style elements using CSS.