Added better entity support