Added separate token for star ('*') as it may have special meaning.
Fixed name clash check.
Moved check functions to single place.