fixed tests + few style/syntax type refactoring updates