Must fix:
- kicad_error() should always get the node that causes the error, not just copy&paste "subtree" which is some nth parent
- no function shall be longer than 500 lines, but even 300 lines longs should be suspicious -> use functions
- if you are more than 10 levels deep in indentation, you are doing it wrong -> use functions
- No Code Duplication ever -> use functions
- no camelCase, the only naming convention pcb-rnd accepts is lowercase_with_underscores
- no commented out dead code liek /* return -1 */; the code must be readable; decide what the code should do and make it do that, and only that
- do not silenlty accept input that could not be handled; the goal is not to open huge complex boards and load only 30% of them but to open boards that we can load almost 100% of
- remove pcb_trace() after fixing a bug - all the old trace messages commented out will not help next time you need to debug something because you will need different messages, but they do make the code less readable

Tips:
- use context structures and pointers ("objects") and write functions that operate on them to help splitting up the code
