Cleaned up/Added edge cases for #1