some smaller refactorings

Change-Id: I769dfc07bb2ae66775893b75a5dfa8258e9f5a1c