added length method, proper error handling
major change. Period is no longer a model, but is a util class that runs period calculations when instantiated with a term object.
misc cleanup (forgot to import error, clarifying comment)