Refactor code, new interface