1. Some changes after code inspection
2. Added JSHint settings
3. Changed JSON generation method