Initial codedump after corrupted Monitor.cs (RIP a lot of code). Not functional, rewrite is in progress.