Added support for more blocks. Bug fixs