implemented class structure for mods

implemented class structure for mods, removed extra .pyc files, moved
code from __init__ files to their own files.