Asset detection moved to function.
Merge pull request #473 from davidmaxwaterman/asset-type

Asset detection moved to function.