Utility additions and fixes