Test analysis and refactoring + stabalization