Added tests for the rest of the utility functions
Fixed some issues with the utility functions themselves