Removed redundant code and Temp Fix Code