Merged with Dominik Krichbaums scripts.