Make the code pretty by unifying on C style and adding documentation to the methods