Added support for cloning and minor whitespace fixes.