better file handling, added edges in all tiers

cleaned up more code for file handling, saving 10 lines.

DetermineTiers now makes edges and children for all tiers. not
functional yet, because they need more attributes like proportions and
origin.
something not working
Revert "something not working"

This reverts commit 14dffd4f3a5baca1fdfcac0c2765868fea43aefc.
it works!

can't redeclare a var with value, will make them local again.
more cleanup

removed unused functions, renamed ambiguous var