Made configuration type-safe

For issue #43