code reformatting/cleanup & fix parent required in foldertype
fix for php 5.3 compatibility
Merge pull request #143 from Kunstmaan/fix-foldertype-parent-required

code reformatting/cleanup & fix parent required in foldertype