There should be a supreme court of elections which should provide the security of the votes, set the required technology infrastructure that helps the system to run smoothly. Also the official results should be reported directly by this organ of the government.
This is taking longer than it should take. There will be conflict in some states about the status of the votes which would result in re-count. This would be really bad for the economy, it will create volatility on stock market.
Worse scenario is both ends declare their victory and call their supporters on the streets.. I can't imagine the chaos it might create. That's why there should definitely be some sort of control mechanism like supreme court of elections.