Restructured the code, changed to unix line endings.