Refactor: extract windows to external packages