Bugfixes & Codecleaning