Fix model design, implement some simple functionalities.