Clean up fock.py

The module fock.py has been significantly cleaned up. Now much cleaner
code has been given there.