Lots of small changes, found seg fault, compiled to do list