Moved JS injection from theme. Added docblocks.