Cleaned up the trait implementation in the grammar