added pointer deletions, general improvements and bugfixes