Fixing errors, modernizing

Getting rid of old stuff and unnecessary stuff as well as fixing errors.