Code complete

Check in all the code of version 1.0