Break logic into separate modules