Added id generator. Refs #8 and #13.