Changes to improve implementation