code for mill entities

#150 Error Fixed and master merged