Tidy up back-end