A bit of optimizations

Removed annoying alert(string)s.