Rearranged views. Fixed bugs. Added scope field