Fixed database error and made minor UI optimizations.