Removed redundant intermediary variables