updated model and collection to AMD module format