add some comments to better explain what the electric imp code is doing.