Fix compiler warnings and build

Fixed them all ;)