Refactor to not be static, Improve tests.