cleanup + bugfi
some more clean-up