better error handeling(untested)
i dont even remember all the stuff i changed here but i did fix some morgan module doohicky