Cleaned the code, adapted Adapter, Fragment and Provider to new requirements