refactored and fixed null characters in profitability.db