Final version. Mostly bugfree.