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

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