Merge "Add better errors for unresolved attributes, remove unused code" into lmp-dev