refactoring modularize, adding element creation in Component.prototype.init