Fix spelling errors and reduce timeouts for expects in tests
Refactor all code to use better class structure