added common focus marking
tidy js code