Added some extra utility functions, more to follow soon.