Made a lot of improvments