Moved BoxEntity to its own file