Added wrapping grid code. Compiles but is not hooked to main yet.
Working.
Added comment.