Code Preparation for Phase 01 coding and minor refactoring