Fixed collection class and added a few functions to utils