Minor cleanup, added documentation.