forgot to add some files, fixed various errors