cleanup
port to trove, fix untrainable features bug
from r2358
Merge branch 'working' into svn-r2356