Some crappy code snippet from my work.