Fixed issue #1 by just changing the innerHTML of the ul to nothing.