Adding more tests
Remove unneeded variables, and cleanup