Branch soen343 refactoring