Removed superfulous javascript function