Add documentation and apply coding standard