initial libraries

Moved some of the component stuff into generic libraries