More work on tests etc