Renamed functions and removed codes