Fixed compare issue. Runs as expected now. Cleaned up code. Moved id generation back to constructor.
Finished.