cleaned up api.py and worked on separation of vcals and xrays in hrefficiency