Added clear() function to element class, fixed some bugs
[element.hpp] Virtualised render() and clear() functions