split the HTM draw functions into a new module