refactor
more refactor, migrate to scons
more refactor