Modularize spj, also build spj.a