Added error reporting on failure to delete directory from project tree.
Added setting of margin properties to support their reordering.