Refactoring the velocity hack