More fixes
Small mods
Refactoring block handling. Almost ready to merge to master
small typo fix