fixed bug with scrolling through pieces
refactored. move stuff out of solver and into utils