some const. remove some unused vars