Fixed errors and other such things found with testing.