A lot of refactoring, changed seq syntax