move code around
implement plugins + dom impl plugin based