Code refactoring + used an algorithm to detect unexisting return statements instead of regex as i couldn't figure the right regex to fit the needs