fixes, fully commented