Code cleanup

Changed code for uniform format