Rewriting internals

Adding internal classes rather than tons of arrays