Ported to current framework.