Refactor Logic models