Makefile: strip output dir in make output
editor: fix some warnings
editor: localize variables
editor: get rid of some nested functions
editor: fix all warnings in bsp