Initial work on SharedObject, system directory and other minor fixes