Merge improvments from master branch

Change-Id: I5d893b1c8169268905edd1786864729f7ada2093