Made some small change and bug fixes