Map between model and database in a better way, add in minimal charting