Reformat code.
Move mucho code into library for web stuff.