Change when_stale from macro to function
Change registry builder to use maps
Use new exceptions
Store release checksum in database