Changed backslashes to forward for Linux/Mac

Also did some cleaning up of code