modified some styles and various arrangements of code