Get rid of creating root-level element in Component constructors

This change will make it easier to port library to work on server-side
in the future.