removed System.exits from etc relevant code parts; added some exception
handling even though could use a lot more work..