Simplifying code for previous commit