Add more arguments, one map, fix some bugs