Made a lot of modifications