Remove external references for browserify (not needed)
Refactor messages data structure