Change replace method and registerEvents()

Removed rotation getting/setting in replaceBlock() and simplified
registerEvents() statement