More changes to fix compiling on Linux. Also changed the function to get expiration on GUI search tab.