Move precmd to it's own function and use precmd_functions instead
Minor update and add execution time to prompt