3Sum ac, clean up some code