viewBase and viewDefault rewritten in coffeescript