refactor js callbacks

all callbacks get the whole message