Altered code so that old tests are fullfilled. Added new tests to indicate new behaviour.