event seeker - clean up js code