Complete refactoring of LTI library