Some snmall changes and enhancements to the model