Code update and clean