Added testblock.
Corrected bugs.