Wrote basic Instance class, replaced some code with instanced code