Various fixes for data modelling