Replaced yesterdays incredibly dirty and disfunctional code with slitghly cleaner and more functional code. Slightly.