Separated code into separate files for maintenance.