Orginzed rest of code. Fixed most errors.