Very ugly, but working! Still many things need to be done.