cleanup local, start refactor