Added unit tests for Blocks and tried to organize things better