Improve smw constructor

Change-Id: I4f862761e3a649fdcb9c44358aa09b37d8585f7b