Database optimisation

Fixed duplicate posts, update if content changes, better parsing (no
2nd new lines needed).