Refactored Sensor components and added TileMap entity encoding.