Initial modularization, GODOC, minor changes.