Added comments and modified log setup