Added json function to allow clean generation of packerfile results. Also added self passback to nearly all functions to allow command chanining