Final code before polishing

This is the final, working code that tries to divide as evenly the
content size as possible to given amount of folders.