update model import code, replace omments with docstrings where appropriate