accounting and other updates

Added accounting functionality as well as other updates.