Begin of a complete refactoring
Improved message errors