Updated tests
Changed functions to use Python standard funtions instead of custom