Updated to API 17. Fixed minor issues