Separated baic.py into separate modules