More convenient dep injection.

Just hide the FEATURES global and use a function instead.