removed alot of unused functions and code
fix file