Code organization changes, currently nonfunctional

Some changes i'm checking in to reorganize the code