I think its better to instantiate the lims instance within the __name__ == "__main__" case.