A lot of bugfixes, inconsistencies, missing stubs fixed.