Check if fields config categories are missing as well; fixes #857
Remove "as" in use statements when not needeed
Remove unused variables