edited todo, fixed the on load JS method to load messages dynamically