Implemented a better block generator