Added all sorts of bugfixes.