Printing to cerr, removed some commented code