Minor cleanup and added some documentation