General refactoring. Fixed events emitter call. Added new option on Logger to auto log errors (default is false now).