Migrated project to Linux. Fixed a lot of bugs in code.