Fixed some bugs. Added dictify method to TinyModel