updated balance and some cleanup