Added tests for util functions
Improved tests