Major structural change

HTML generation and JS code moved from notebooks to module for cleaner
end user experience