debugging disabled + some unused code removed