Huge overhaul. WIP