Updated collection handling to allow maps