Added minSize and maxSize, and split the public API from helper methods (I prefer not having big files... just for organization purposes)