Add APES and reorganise tests