Cleaned up the last few bugs