Javadoc.
Fixed block counter in log statements.
Added a test case.
Added more test cases.
Disabled another test case for now.
Added synchronisation.