Post all the codes you are getting. The more information you share the better folks here can help.
P0174 looks to be fuel/air ratio is too lean, not pedal sensor.
Dont be too quick to dismiss how your friend modified the tune in your vehicle. Not discounting your friends ability, but even...