Pretty print JSON when in debug mode
Add lecture api