Renamed tilde function and did more cleanup