Code cleanup and remove unnecessary wrapper