Reorganised the file system to separate out the packages a little more. Also cleaned up the idgenerator interface and implementations. All tests still pass fine.