Fixed error where the pie chart would not update correctly
Moved code around for cleaner organizaton and fixed a bug in the pie chart where it would incorrectly divive for new expenses