Adding FlowChart PDF, more JS methods, code cleanup