Fixed problems with toString and exception logs

Added Liscense to all files