Minor fixes, added more tests that need to pass showing broken edge cases