JS moved to file, order search implemented