Added (de)select mails for deletion.
Added jquery ui.
Small fixes.
Added some more comments to the code.