Fixed join
Some cosmetics have been added.
bugfix and column types
Refactoring.