Fixed the single layer generator and add offset config option