Cleaned up stuff that was buggy