Using more idiomatic partial function withConfiguration. Added getBoolean() and explicit return types for clarity