Modularize everything

This is needed to disambiguate certain functions .