removed all old, unused code (the vast majority of the file)