Moved house keeping storage routines to their own implementation.