Better but still not working...

Fixed most warnings aswell.