added ability to trim tuning and test data (--maxlen-tune and --maxlen-test)