Convert Velocity code to FreeMarker (along with references)