Update block handling (again). Added handling for better layout. Not complete.