Initial implementation code.