Handle optional atrribute + tests + sample working.