Handmade Solution Refactor