add lucky (-l) flag to play first search result, code cleanup