Clean singularity code a bit.
Merge pull request #878 from ESwordTheCat/ubn2DxAa

Clean singularity code a bit.