Tidy up unused functions