Small fixes and first working version