add tests, fix errors tests found regarding data being declared and not used, cleanups