master Added a lot of fixes