Restructuring of hierarchy for semantic correctness, types added, attribute marshalling capability, and a few minor bug fixes.