Restructure encoding specs