Almost ready.

Signed-off-by: Krzysztof Opasiak <ups100@tlen.pl>
It's working. Now time to clean up.

Signed-off-by: Krzysztof Opasiak <ups100@tlen.pl>