fixed some stuff, still errors left to fix.