separated markup from js. added discipline init function to library file...

..., moved associated global vars/methods into that function. added method invokation on dom ready to bottom of owning page template.