Better indentation and added docblocks