Refactor to multi-files