Removed all but one warnings. The remaining one (only?) can be solved with selecting an optimisation option.