Started off as a build from a youtube tutorial but branched out into something of my own - refactoring most of the code