General fixes/improvements

Keyword is now trimmed before validation. AJAX request is made in try-block
Merge commit '6e1927e1a6408b9010f3773b29f254284273eb15'