Added function to calculate days left. Rearranged code
Confirmed dev branch works with top-down testing. Will merge with master branch
Changes from dev merged to master