refactoring, setup files for testing, work on plateoptimizer, but keep off