refactors.

up to api level 16...