Major cleanup / documentation