Logic: moved all utility functions into LogicUtilities and changed
visibility of functions and variables in LogicUtilities