Clean up to use this instead of access to the scope attributes