Code written at work, potential useful functions within.