got rid of some errors, still alot of todos