Added InvertedAABBox2D and EntityFunctionTemplates from the book's code