Refactor, split in multiple files.