Code slightly cleaned up.