Cleanup deprecated codes