Many bug fixes, protocal additions.