Code cleanup and proportion plotting

Cleaned up and refactored messy or redundant code. Added functions to
plot trend and proportion of failures alongside each other for any time
interval using either `show_trend_by_minutes` or `show_trend_by_hours`