Added getLastID. Refactoring IDGenerator idea