Reformatted code in sample.js
Refactored & cleaned up some code in axn.js