Code cleanup and test html math output options.