Massive refactor of my bash life