fixing time parsing
general refactoring
more refactoring. need to test these last 2 commits