Made some various improvments