Reorgazing code to be a little more compartmentalized. This process is not finished