Removed unused code
Folders wip
More wip
Fixed some warnings
Added folder support