factored renderCallback to its own method for easier overriding, removed extraneous methods from AmdTemplate