Updated collections javascript based on feedback