Added messaging scheme and interface(less javascript)