* Formatting, extract error messages * More refactor * Move errors to a separate file * Add missing file * Misc