Updated branch with changes from SimonGoring/master