Changed id into class based identification. And fixed a static const bug.