Folding of functions, namespace declarations and imports

Closes #50 - Folding of functions
Closes #23 - Imports and namespaces declarations folding