Some more refactoring and applied the change of minimum API from 11 to 14.