Refactor

created utils.py to isolate utility functions for airpy