After more than 4 hours of stonewalling, me and Gustavo finally managed to get velocity working. I'm using velocity for the formatting now.