Thread safety

Shit should now be thread safe, and ok with you cancelling commands partway through db access.