Add magic number for sanity check
Add spiral iteration
Code cleanup