Cleaning up SMUtils + Unit tests
code cleanup + unit tests