refactored code to more managable structure
introduced directory structure