added more util programs, added tests, code cleanup #12