Added ping and close functionality
Added methods for type mapping