small cleanup & add comments