The source project of this merge request has been removed.
General code cleanup, adding missing error messages, fixing some formatting,...
General code cleanup (lots of white space changes unfortunately). Adding missing error messages, tried to ensure that every return statement generates an error/warning to make sure that nothing can fail silently. I have also added some comments for aspects of the code that require further investigation