Fix callback duplicate bug

Callback function was being left in the template list and being
stringified and requested by the server. This resolves issue #25.