Added console logger and do a little cleanup