Some more refactoring/cleanup
Allow attribute inheritance