Changes to make compatible with tar file distribution