Error msg refactoring, routes refactoring and master code moving