Asset detection moved to function.

ssia