Tidy up SELECT queries
Tidy up INSERT queries
Tidy up UPDATE queries
Tidy up DELETE queries
Update sequences after manual ID inserts