Refactor - dividing files into modules