Fixed a lot of things
many changes for camera ready