Some code cleanup / commenting