cleaned it up a lot, kinda broke now though