Cleaned up some small bugs