Added and fixed comments (new style); renamed and fixed warning fn