Fixed some dumb issues in the code since I am using vi.