Add 'id' and 'parentId' to Unit Class.  Also add a global variable called idCounter.