Did a reformat code to make things readable