Neworking somewhat working ( i think )
Also some cleanup