Removed redundant variables and simplified return statements
Merge remote-tracking branch 'origin/dev' into dev