add unit tests for creating spiral, clean up code for Project Euler problem 28