Messy state. WILL need to be further documented and cleaned.