Fixed some typos, unused imports and changed some access modifiers to package private.