Refactored to better apply functions over block pieces