Configurable template methods. Fixes #38