Remove onLoad and add registerProtocols