refactored lab_viewer.py - moved api creation to services