remove code not in use and fix #11