Correct coding conventions and improve documentation