Replaced C-Style

Thanks to the help of Joe Z from StackOverflow.