Made most things working

Still not perfect