Updated database diagram.
Code cleanup.