Remove some unused code
Cleaning up main.py a bit
Add some doc