Refactoring, Debbugging and added a few safety futures. Next to all seems to work.