Refactoring, fixes tests & set `null` for base key & `'flash_message'` for key by default.