Update perform.js

Before and after functions now working.