Changed mycode.py to class-based, added and improved features