revert some changes and clean up