moved the type factories into array functions for the model and added a prepend function to dom