New specs for folders
Added documentation, minor refactoring