Another set of solutions and some additional util details.
Merged conflicts from the last commit which caused issues.