am ae553143: Refactor a bit.

Merge commit 'ae5531434877478985186dd0fb7ffefa12a74e52' into gingerbread-plus-aosp

* commit 'ae5531434877478985186dd0fb7ffefa12a74e52':
  Refactor a bit.