First version. (Mainly test code)