moved the Block class to its own file.