better logging information, removed useless functions.