Rebased a ton of code, using Preconditions wherever possible