Add prfun and use Promises on _version route

Change-Id: I57e5971a33420c1aa16c75fd333bbc0264ddc568