Improved trivial and easy leaves computation