Fix all warnings and errors