Create fsim.js

The simulation class