Added Predictor API with tests. fixed #1
Added Dictionary API. fixed #3
Code refactored.