Fixed bugs on the creation of manager
Fixed bugs on count_parameters
Fixed several small bugs of protocal.py
Added test_protocal.py