Refactoring & Stock tester