Add the initial attempt at the initial porting of abm.py to js