hahsjoin cse for grappa

other refactorings small