Gmail search and attachment download features added

Added support for gmail style search and ability to download attachments.