Revised project structure and integrated code with testing routine