using markup callbacks and some fixes from todoMVC