Refactored code for debugging support
Set up proper code directories