rebase and major cleanup - todo: cusomize interface even more!