Various code cleanup
Implemented loading of packages from user folder and from subfolders.