Use a style flag to enable dynamic notebooks #56 and fix for issue #55

I've also made some code cleanup to remove dead code.