builtins: fixed all instances of getCollection, plus some cleanup