refactored some functions into util.py, started MCServer class