Format code to class style