Add setDefault()
Merge pull request #146 from zapion/v2.0

Add setDefault()
remove test code in main function
Merge pull request #150 from zapion/v2.0

remove test code in main function; r=me