Looked to DRY up the code and created functions for common pieces of code. Started -t option, but having trouble with logic of it. -t not functioning yet.