Refactor objects vs primitives

major refactor. reduced the amount of primitives used to the bare minimum