Re-wrote internals to allow for a nicer DSL instead of hash-based configuration.