Refined and added logging
added new jobs for persitence and querying - have yet to implement.
Refined tests.