Wrote article, fixed various bugs in the code and added a couple useful features to complete the initial version.