Multiple changes

style change
error reporting
todo changes