Minor changes, tried to remove all code that was not completly needed.