Commented more code and removed unused code.