prepareContent refactor; coffeescript support