did some refactoring (code folding and test organization), still ongoing