Test and implement registering components.
Check that component tables exist.
Take database and manager setup functions out into helper function