reorganize code and specs