Changed named_scope to scope. Not sure if this is correct or not.