Initial import of version 2 code.