Added ptheorem.py, optimized shapes.py, fixed __init__.py