Added a lot

few fixes and actually testable