Small fixes.
Reorganizing functions.