Code and tests updated
Tests fixed and written