First of all, I'm by no means a professional software engineer, so this won't be the cleanest code y...