Improve the model, add some comments
Close #32. Fix the issues when loading empty file.
Improve the logic object.