Refactor config listening into custom behaviour