Initial experiments.
Some refactoring.
Working working.