Deal with alternative template syntax & fix deprecated method