Removes innecesary blocks