convert all configs to configs array, and fix up hooks
fix tests for refactored code
only support hash configs, add default configs and merge parameter configs
Merge pull request #1 from relud/all_configs

Move more options to configs parameter