Don't manually escape database data
Separate export function into classes