Update pulse.js

Added method ports, the component class and some misc code gathered from the web