more modular functions, dep injection, updated test object in test.html