Code Refactoring & functional tests verification