Refactoring the code to ease the maintenance of the safetymapsDBK app and derived components.