Moved certificate loading into separate function