refactored files into multiple ones in order to structurize the code better