windows service refactor