Removed unnecessary alert and legacy commented code.