removed more unused stuff and modernized code