Horrible code, built on Windows, as my first actual project ever