Implement general WAttribute
A little refactoring