Works on Windows now. Variables renamed more appropriately.