Removed trailing spaces.
Enabled the strict mode.
Fixed code style.
Made some classes immutable.