added a few improvements and fixed some of the degisn issues