Cleaned up the sources (in preparation to breaking them up in modules)