Added a utils lib, with some common utility functions and refactored spin to use those