Started documenting. Minor cleanup