fixed tests and false positives
major refactoring to make it more intutive