Delayed appending until toggle triggered

Updated common with improved naming conventions, separated appending
functions, added individual code syntax highlighting.

Removed document click event listener, needs to be integrated properly.