Refactored

Use the content provider more often and other small things