Added site variable retrieval
Added gallery helper function