Refactored to make dropping in an updated ansilove.js script easier.