Fixedup style, added tests
Reduced complexity added tests