Fixed some bugs and made minor modifications.
Made small changes