Refactored DOM selectors, added some tests for options and popup