Improvements to code format & documentation