Cleaned up a few bugs for deployment