Got part of the puzzle done and fixed some bugs.