Refactored to use rivets.js