Implement code for autoformat