Cleanup and add factorization / xycraft