Split the logic into multiple files