Fixed Issues with ApplicationHandler

Made it so that the ApplicationHandler tracks time more appropriately,
rather than being entirely based on the start time and current time
(saves it between instances of a single program).

Also set up groundwork for saving ApplicationHandlers to the database to
store the status and total runtime of a program.