Update code to new code style