Refractored some stuff, more readability, still working.