Corrected a few things in code