Following a Cprogramming.com tutorial by Ben Marchant.