Refactored I/OM; added some helper functions for GUI setup