Tidy up of redundant code