javascript module for manipulating web templates