Stop random exits, echo only in router.php

Remove exits from different places, echo only in router.php
Remove debugging code

Remove debugging code
Merge remote-tracking branch 'origin/master' into back-end-working
Merged from master.