transactions, consistency and moving stuff from main to background