Fix extends/block support. Working tests