fix type in connection.rb, rearrange some stuff in receiver.rb so CommandMethods wordk