Rewrote code such that return statements are unnecessary.