Code refactoring

Block.cs part done