Corrected minor and major bugs. I'm really specific at this hour of the night.