More class definitions rewritten
Added index and local