Bugs/Issue Fixes

I tried to fix as many issues/bugs I could find. I still know a few I
need to fix. I just want to commit all these recent changes...