Implementation of JAPE based on Kim Binstead's 1996 paper