Formatting consistenciy updated
Fixed several code inconsistencies