cleanup and re-enable some code