Why didn't you use Velocity? This will become unmaintainable.