and also some minor refactoring. Change-Id: I0e74f30ef1b035d9ed37571c512fedc15d05db77
037b54cf
05be6d6f