some cleanup to prepare for block memory support