Move some logic