Some code edits. Edited to follow code convention