added and bugfixed quite a lot of stuff