Namespace cleanup

Laundry list of changes, e.g.:
1) PEP 8 compliance of import statements
2) Removed imports from inside function calls
3) Moved code from __init__.py wherever sanely possible
4) Ensured imported names were used
5) Corrected potential name aliasing issues
6) Switched to absolute imports
7) Ensured __all__ specified correct public interface
8) Changed some module names and function names to more useful names