Functional Tetris

Cleaned up the code