- Added logging support
- Beautified code