Many bugs fixed. Working good for a preliminary demo.