Updated to allow running from jar