fix and remove useless and old apis