Use own class to store global variables